<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Netbook shop</title>
		<link rel="stylesheet" href="resources/css/validationEngine.jquery.css" type="text/css"/>
		<%@include file="header.jsp" %>
	</head>
	<body>
		<div id="wrapper">
			<div id="splash">
				<img src="resources/images/pic1.jpg" alt="" />
			</div>
			<div id="menu">
				<ul>
					<li><a href="index">Homepage</a></li>
					<li><a href="notebooks">Notebooks</a></li>
					<li>
						Account <span class="arrow"></span>
						<ul>
							<c:choose>
								<c:when test="${ firstname != null }">
									<li class="first"><a href="logout">Logout</a></li>
								</c:when>
								<c:when test="${ firstname == null}">
									<li class="first"><a href="login">Inloggen</a></li>
									<li><a href="registratie">Registreren</a></li>
								</c:when>
							</c:choose>	
						</ul>
					</li>
					<li><a href="about">About</a></li>
					<li class ="cartI"> <img src="resources/images/shopping_cart.png" alt="" /></li>
					<li class ="cart"><a href="winkelwagen">Winkelwagen</a></li>
				</ul>
				<br class="clearfix" />
			</div>
			<div id="page">
				<div id="content">
				<div class="box">
					<h1>winkelwagen</h1>
				</div>
					<br class="clearfix" />
				</div>
				<div id="content">
					<div class="box">
						<br />
						<div>
							<form id="ShoppingCartform" action="ShoppingCartCheckup" method ="post">
								<c:choose>
								<c:when test="${id != null}">
								<table class="CompareList" cellspacing="0" >	
								</c:when>
								</c:choose>	
								
								
									<c:forEach items="${ShoppingCart}" var="ActiveOffer" >	
								
									
										<tr>
											<td>Aantal :<input class="validate[required, custom[integer], min[1], max[10]]" type="text" name="amount" value="<c:out value="${ActiveOffer.amount}"/>"></input> </td>
											<td>Naam : ${ActiveOffer.name}</td>
											<td>Prijs : &euro; ${ActiveOffer.price}</td>
											<td> <button class="submit" type="submit" name="btnRemoveP" value="${ActiveOffer.EAN_UCC_13}">Verwijderen</button></td>
										</tr>
									
									</c:forEach>
									
									<c:choose>
									<c:when test="${id != null}">	
									</table>
										</c:when>
								</c:choose>	
									
								<c:choose>
									<c:when test="${ firstname != null && id != null}">
										<br/>
										<button class="submit" type="submit" name="btnNext" value="Next">Afronden</button>
									</c:when>
									<c:when test="${ firstname == null && id != null}">
									<br/>
									<button class="submit" type="submit" name="btnlogin" value="login">Gelieve in te loggen om een notebook te kopen.</button>
								</c:when>
								<c:when test="${firstname == null || firstname != null  && id == null}">
								<button class="submit" type="submit" name="btnPAdd" value="PAdd">Een product toevoegen.</button>
								</c:when>
								</c:choose>	
							</form>
						</div>
					</div>
				</div>		
				<div id="sidebar">
					<div class="box" >
						<h3>Mijn Account</h3>
						<c:choose>
							<c:when test="${firstname != null}">
								Welkom, <a href="account" ><c:out value="${firstname}"></c:out></a>
							</c:when>
							<c:when test="${firstname == null}">
								Log nu in !
							</c:when>
						</c:choose>
					</div>
					<div class="box">
						<h3>contact</h3>
						<p>
							Neem contact op door <a href="mailto:info@notebookshop.com">hier</a> te klikken.
						</p>
					</div>
				</div>
				<br class="clearfix" />
			</div>
		</div>
		<div id="footer">
		</div>
		<script src="resources/js/jquery.validationEngine-nl.js" type="text/javascript" charset="utf-8"></script>
		<script src="resources/js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
		<script>
			$(document).ready(function(){
		   		$("#winkelwagenform").validationEngine();
			});
		</script>
	</body>
</html>